num = int(input("请输入一个整数: "))
sum = 0
for i in range(num+1):
    sum += i
print("1~%d的总和为:%d"%(num,sum))